<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //1.查询水果信息
        /* var fruit = prompt('请输入您要查询的水果价格:');
        switch(fruit){
            case '苹果':
                alert("您要查询的苹果价格为: 4.9元/斤");
                break;
            case '香蕉':
                alert("您要查询的苹果价格为: 2.0元/斤");
                break;
            case '橘子':
                alert("您要查询的苹果价格为: 1.5元/斤");
                break;
            default:
                alert("没有查询到此水果!!!");
        }
        */

        //2.判断星期几
        var date = new Date();
        var time = date.getDay();
        switch (time) {
            case 0:
                alert('星期天');
                break
            case 1:
                alert('星期一');
                break
            case 2:
                alert('星期二');
                break;
            case 3:
                alert('星期三');
                break;
            case 4:
                alert('星期四');
                break;
            case 5:
                alert('星期五');
                break;
            case 6:
                alert('星期六');
                break;
        }
    </script>
</head>

<body>

</body>

</html>